package com.huawei.appmarket.service.store.awk.card;

import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import android.view.View.OnClickListener;
import com.huawei.appgallery.foundation.card.base.card.BaseDistCard;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.appmarket.service.appdetail.bean.detail.DetailReportBean;
import com.huawei.appmarket.service.appdetail.view.widget.DetailReportProtocol;
import com.huawei.appmarket.service.appdetail.view.widget.DetailReportProtocol.Request;
import com.huawei.appmarket.service.settings.view.widget.EnterLayout;
import o.cgz;
import o.cjk;
import o.cjm;
import o.cjo;
import o.ckt;
import o.dge.d;
import o.dgh;
import o.ContentManager;
import o.ewm.j;
import o.ewm.n;

public class DetailReportGeneralCard extends BaseDistCard implements OnClickListener {
    protected String ʻ;
    private String ʽ;
    protected EnterLayout ˋ;

    public /* synthetic */ cgz ˏ(View view) {
        return ˊ(view);
    }

    public DetailReportGeneralCard(Context context) {
        super(context);
    }

    public DetailReportGeneralCard ˊ(View view) {
        this.ˋ = (EnterLayout) view.findViewById(j.ˌʿ);
        this.ˋ.setMemoVisibility(8);
        this.ˋ.setLastLineGone();
        this.ˋ.setOnClickListener(new ckt(this));
        ʽ(view);
        return this;
    }

    public void ˏ(CardBean cardBean) {
        DetailReportBean detailReportBean = (DetailReportBean) cardBean;
        if (detailReportBean == null || TextUtils.isEmpty(detailReportBean.ˊ())) {
            this.ˋ.setVisibility(8);
            return;
        }
        this.ˋ.setTitle(detailReportBean.ˊ());
        this.ʻ = detailReportBean.ͺˏ();
        this.ʽ = detailReportBean.ˊ();
    }

    public void onClick(View view) {
        if (view.getId() == j.ˌʿ) {
            ˎ();
            cjo detailReportProtocol = new DetailReportProtocol();
            Request request = new Request();
            request.ˊ(this.ʻ);
            request.ˎ(this.ʽ);
            detailReportProtocol.ˏ(request);
            cjk.ˎ().ˋ(view.getContext(), new cjm("detail.report.activity", detailReportProtocol));
        }
    }

    private void ˎ() {
        dgh.onEvent(new d(ContentManager.getInstant().getContext(), n.ॱʽ).ˏ("01|" + this.ʻ).ˋ());
    }
}
